1. Field of the Invention
Embodiments of the present invention generally relate to image compression and, more particularly, to a method and apparatus for a memory efficient approach for decoding progressive JPEG images.
2. Description of the Related Art
Image compression coding as specified by the Joint Photographic Expert Group (JPEG) is preferred in many applications. JPEG compression is an image compression technique that reduces files to about 5% of their original file size, with little perceptible loss in image quality. In order to view a JPEG compressed image (hereinafter called a JPEG) on the display of a computing device, the JPEG must be decompressed into a red/green/blue (RGB) color space before being applied to the display.
Progressive mode of JPEG compression divides the original image file into a series of sequential scans of digital image data, where each sequential scan provides progressively more detail of the original image. The progressive mode JPEG is able to display a rough approximation of the original image after a first of the sequential scans of the compressed data has been decoded, and the image quality is then gradually improved as more scans are decoded and the decoded data is added to the decoded data from the prior scans. Therefore, one can roughly view the image before all of the compressed data of the image is completely received and decompressed. When the JPEG is displayed on a client device, a JPEG decoder converts the scans to an uncompressed bitmap image. Decoding a progressive JPEG image is a memory intensive process. Some images cannot be opened on certain devices due to memory constraints.
Therefore, there is a need for a method and apparatus for a memory efficient approach for decoding progressive JPEG images.